package com.tuda.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.tuda.common.annotation.Excel;
import com.tuda.common.core.domain.BaseEntity;

/**
 * token备份记录对象 tuda_token_info
 * 
 * @author tuda
 * @date 2023-07-13
 */
public class TudaTokenInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增主键 */
    private Long id;

    /** 业务主键 */
    @Excel(name = "业务主键")
    private String tokenNo;

    /** token令牌 */
    @Excel(name = "token令牌")
    private String token;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户类型 */
    @Excel(name = "用户类型")
    private Long userType;

    /** 是否是账号 1是 */
    @Excel(name = "是否是账号 1是")
    private Integer isGop;

    /** 是否失效 0未失效1已失效 */
    @Excel(name = "是否失效 0未失效1已失效")
    private Integer invalid;

    /** 当前时间超过该时间也属于失效，规则生成时间+1day */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "当前时间超过该时间也属于失效，规则生成时间+1day", width = 30, dateFormat = "yyyy-MM-dd")
    private Date invalidDate;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTokenNo(String tokenNo) 
    {
        this.tokenNo = tokenNo;
    }

    public String getTokenNo() 
    {
        return tokenNo;
    }
    public void setToken(String token) 
    {
        this.token = token;
    }

    public String getToken() 
    {
        return token;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setUserType(Long userType) 
    {
        this.userType = userType;
    }

    public Long getUserType() 
    {
        return userType;
    }
    public void setIsGop(Integer isGop) 
    {
        this.isGop = isGop;
    }

    public Integer getIsGop() 
    {
        return isGop;
    }
    public void setInvalid(Integer invalid) 
    {
        this.invalid = invalid;
    }

    public Integer getInvalid() 
    {
        return invalid;
    }
    public void setInvalidDate(Date invalidDate) 
    {
        this.invalidDate = invalidDate;
    }

    public Date getInvalidDate() 
    {
        return invalidDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tokenNo", getTokenNo())
            .append("token", getToken())
            .append("userId", getUserId())
            .append("userType", getUserType())
            .append("isGop", getIsGop())
            .append("invalid", getInvalid())
            .append("invalidDate", getInvalidDate())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
